package org.example.api.admin;

import org.example.R.R;
import org.example.service.pc.VolunteerWorkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/admin/volunteer")
public class VolunteerWorkController {

    @Autowired
    private VolunteerWorkService volunteerWorkService;


    @PostMapping("/list")
    public R list() {
        return volunteerWorkService.list();
    }



    @PostMapping("/delete")
    public R delete(@RequestParam("id") Long id) {
        return volunteerWorkService.delete(id);
    }
}
